﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LIMS.Entities;
using LIMS.DataAccess;
using System.Collections;
using System.Reflection;
using Castle.Core.Logging;
using NHibernate.Criterion;

namespace LIMS.Service
{
    public class ManufacturersService : IManufacturersService
    {
        //Private DBA interfaces
        private IDaoFactory oDBFactory;
        private IManufacturersDAO oManufacturersDBA;
        private ILogger logger;

        //Constructor
        public ManufacturersService(IDaoFactory oDBOp, ILogger oLogger)
        {
            this.oDBFactory = oDBOp;
            this.oManufacturersDBA = oDBFactory.GetManufacturersDAO();
            this.logger = oLogger;
        }

        public List<Manufacturers> GetAllManufacturerForGrid(ref GridViewData oGrdData)
        {
            return oManufacturersDBA.GetAllForGridView(ref oGrdData);
        }



        #region IManufacturersService Members
        /// <summary>
        /// save Manufacturers
        /// </summary>
        /// <param name="oAuditTrail"></param>
        /// <returns></returns>
        public bool Save(Manufacturers omanufacturers)
        {
            return oManufacturersDBA.QuickSaveOrUpdate(ref omanufacturers);
        }

        public bool Delete(Manufacturers omanufacturers)
        {
            return oManufacturersDBA.QuickDelete(omanufacturers);
        }

        #endregion

       
    }
}
